home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_217 / stevie / porting.doc < prev    next >
Text File  |  1992-05-06  |  2KB  |  74 lines

  1.  
  2.          Release Notes for STEVIE - Version 3.31B
  3.  
  4.                    Porting
  5.  
  6.              Tony Andrews -  March 6, 1988
  7.             G. R. Walter -  January 6, 1988
  8.  
  9.  
  10.     Porting the editor is a relatively simple task. Most of the
  11. code is pretty machine-independent. For each environment, there is
  12. a file of routines that perform various low-level operations that
  13. tend to vary a lot from one machine to another. Another file contains
  14. the escape sequences to be used for each machine.
  15.  
  16. Note however that 'char' is treated as unsigned so you need to set the
  17. appropriate compiler flags if this is not the default.
  18.  
  19.     The machine-dependent files currently used are:
  20.  
  21. tos.c:     Atari ST - ifdef for either Megamax or Alcyon
  22. tos.h
  23.  
  24. unix.c:     UNIX System V
  25. unix.h
  26.  
  27. os2.c:     Microsoft OS/2
  28. os2.h
  29.  
  30. dos.c:   MS DOS
  31. dos.h
  32.  
  33. amiga.c: Amiga
  34. amiga.h
  35.  
  36. bsd.c:   BSD 4.3 UNIX
  37. bsd.h
  38.  
  39.     Each of these files are around 150 lines long and deal with
  40. low-level issues like character I/O to the terminal, terminal
  41. initialization, cursor addressing, and so on. There are different
  42. tradeoffs to be made depending on the environment. For example, the
  43. UNIX version buffers terminal output because of the relatively high
  44. overhead of system calls. A quick look at the files will make it clear
  45. what needs to be done in a new environment.
  46.  
  47.     Terminal escape sequences are in the file "term.h". These are
  48. defined statically, for the time being. There is some discussion in
  49. term.h regarding which sequences are optional and which are not. The
  50. editor is somewhat flexible in dealing with a lack of terminal
  51. capabilities.
  52.  
  53.     The character set is in the file "charset.c".
  54.  
  55.     Because not all C compilers support command line macro definitions,
  56. the #define's for system-specific macros are placed in the file "env.h".
  57. If you port to a new system, add another line there to define the macro you
  58. choose for your port.
  59.  
  60.     The basic process for doing a new port is:
  61.  
  62.     1. Come up with a macro name to use when ifdef'ing your system-
  63.        specific changes. Add a line to 'env.h' to define
  64.        the macro name you've chosen.
  65.  
  66.     2. Look at amiga.c, bsd.c, unix.c, tos.c, dos.c and os2.c and copy the
  67.        one that comes closest to working on your system. Then modify your
  68.        new file as needed.
  69.  
  70.     3. Look at term.h and edit the file appropriately adding a new
  71.        set of escape sequence definitions for your system.
  72.  
  73.     4. Compiling and debug the editor.
  74.